package com.justgame.project.service.online.controller;

import com.justgame.project.cloud.common.constant.Result;
import com.justgame.project.service.api.dto.OnlineUserInfoDTO;

import com.justgame.project.service.online.service.OnlineUserInfoService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("/online/user-info")
@AllArgsConstructor
public class OnlineUserInfoController {
    private final OnlineUserInfoService onlineUserInfoService;

    @PostMapping("update")
    public Result<?> updateInfo(@RequestBody @Valid OnlineUserInfoDTO dto){
        return Result.status(onlineUserInfoService.updateInfo(dto));
    }


}
